package cn.com.pet.common.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.pet.common.dao.PrivilegeMapper;
import cn.com.pet.common.entity.AdminUser;
import cn.com.pet.common.entity.Privilege;
import cn.com.pet.common.service.PrivilegeService;

@Service("privilegeService")
public class PrivilegeServiceImpl implements PrivilegeService {

	@Autowired
	PrivilegeMapper privilegeMapper;

	@Override
	public List<Privilege> getAllPrivilege() {
		return privilegeMapper.getAllPrivilege();
	}

	@Override
	public List<AdminUser> getPrivilegeList(Privilege privilege) {
		return privilegeMapper.getPrivilegeList(privilege);
	}

	@Override
	public AdminUser getPrivilegeById(Privilege privilege) {
		return privilegeMapper.getPrivilegeById(privilege);
	}

	@Override
	public int updatePrivilege(Privilege privilege) {
		return privilegeMapper.updatePrivilege(privilege);
	}

	@Override
	public int addPrivilege(Privilege privilege) {
		return privilegeMapper.addPrivilege(privilege);
	}
}
